#!/bin/sh
[ ! -d log ] && mkdir log

logfile="./log/center.log"


#新版本采用java8，在有些机器上存在新老版本共有的情况，这里需要明确指明java8路径
JAVA_HOME=/usr/java/jdk1.8.0_101

        CLASSPATH="."
        #CLASSPATH.
        for jarfile in $(ls lib/.);
        do
        CLASSPATH="${CLASSPATH}:lib/$jarfile"
        done

        echo ***begin***
        echo ${CLASSPATH}

        nohup java \
	 -cp ${CLASSPATH}:./classes\
	 -javaagent:./lib/springloaded-1.2.6.RELEASE.jar -noverify \
	 -Dfile.encoding=utf8 \
          com.daqsoft.PMISAppLauncher >"${logfile}" 2>>"${logfile}" &
sleep 1
tail -f ${logfile}
